<!DOCTYPE html>
<html>
<head lang="en">
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../css/main.css">
    <link rel="stylesheet" href="../../css/layui.css" media="all">
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="../../js/layui.js" charset="utf-8"></script>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <style type="text/css">
        div#t1 {
            width: 90%;
            float: left;
            margin: 5px 20px 2px 2px;
        }
        div#t2 {
            margin: 5px 20px 2px 2px;
            padding: 0px 0px 11px 0px;
        }
    </style>

</head>
<body>
<div class="layui-tab layui-tab-card">




        <div class="form-group" id="t1">
            <input type="text"  id="shyj" class="form-control"  placeholder="审批意见">
        </div>
        <div class="form-group" id="t2">
        <a class="btn btn-primary" onclick="projectAudit()">审批</a>
        </div>


    <ul class="layui-tab-title">

        <li class="layui-this">项目概况查看</li>
        <li>总费用查看</li>
        <li>现场信息查看</li>
        <li>购置明细查看</li>
        <li>拆除明细查看</li>
        <li>CAD走向图查看</li>
        <li>申请书查看</li>

    </ul>

    <div class="layui-tab-content">

        <div id="layout1"  class="layui-tab-item  layui-show">
            <iframe src="t3xmgk.html"  id="frame1" width="100%" height="360" frameborder="0">
            </iframe>
        </div>
        <div id="layout2"  class="layui-tab-item  ">
            <iframe src="tzfy.html"  id="frame2" width="100%" height="360" frameborder="0">
            </iframe>
        </div>

        <div id="layout3" class="layui-tab-item">
            <iframe src="apbaseothorcj.html"  id="frame3" width="100%" height="360" frameborder="0">
            </iframe>
        </div>
        <div id="layout4" class="layui-tab-item">
            <iframe src=""  id="frame4" width="100%" height="360" frameborder="0">
            </iframe>
        </div>
        <div id="layout5" class="layui-tab-item">
            <iframe src=""  id="frame5" width="100%" height="360" frameborder="0">
            </iframe>
        </div>
        <div id="layout6" class="layui-tab-item">
            <iframe src="ashowdxfandexp.html"  id="frame6" width="100%" height="360" frameborder="0">
            </iframe>
        </div>
        <div id="layout7" class="layui-tab-item">
            <iframe src=""  id="frame7" width="100%" height="360" frameborder="0">
            </iframe>
        </div>
    </div>
</div>



<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>

    $(function () {
        var guid= GetUrlParam("guid");
        var longitude= GetUrlParam("longitude");
        var latitude= GetUrlParam("latitude");


        var frame1 = document.getElementById('frame1');
        var frame2 = document.getElementById('frame2');
        var frame3 = document.getElementById('frame3');
        var frame4 = document.getElementById('frame4');
        var frame5 = document.getElementById('frame5');
        var frame6 = document.getElementById('frame6');
        var frame7 = document.getElementById('frame7');

        frame1.src="t3xmgk.html?guid="+guid;
        frame2.src="tzfy.html?guid=" + guid;
        frame3.src= "dpoint212.html?guid="+guid+"&longitude="+longitude+"&latitude="+latitude;
        frame4.src= "purchase.html?guid=" + guid ;
        frame5.src="remove.html?guid=" + guid ;
        frame6.src ="ashowdxfandexp.html?pGuid="+guid;
       // frame6.src= "ashowdxf.html?guid=" + guid;
        frame7.src= "cksqs.html?guid="+guid;
    })

    layui.use('element', function () {
        var $ = layui.jquery
            , element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

        //触发事件
        var active = {
            tabAdd: function () {
                //新增一个Tab项
                element.tabAdd('demo', {
                    title: '新选项' + (Math.random() * 1000 | 0) //用于演示
                    , content: '内容' + (Math.random() * 1000 | 0)
                    , id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                })
            }
            , tabDelete: function (othis) {
                //删除指定Tab项
                element.tabDelete('demo', '44'); //删除：“商品管理”


                othis.addClass('layui-btn-disabled');
            }
            , tabChange: function () {
                //切换到指定Tab项
                element.tabChange('demo', '22'); //切换到：用户管理
            }
        };

        $('.site-demo-active').on('click', function () {

            var othis = $(this), type = othis.data('type');

            active[type] ? active[type].call(this, othis) : '';
        });

        //Hash地址的定位
        var layid = location.hash.replace(/^#test=/, '');
        element.tabChange('test', layid);

        element.on('tab(test)', function (elem) {

            location.hash = 'test=' + $(this).attr('lay-id');
        });

    });
    //    $(function () {
    //

    function showPhotos(images) {
        parent.showPhotos(images)
    }
    function projectAudit() {
        var guid=GetUrlParam("guid");
        var shyj= $("#shyj").val();
        layer.confirm('您是否要审核通过该项目？', {
            btn: ['审核不通过', '审核通过'] //按钮
        }, function () {
            var url = "bss/apbase/projectAudit";
            $.ajax({
                type: "POST",
                url: baseURL + url,
                data: {
                    "guid": guid,
                    "shyj":shyj,
                    "isPass": false
                },
                success: function (r) {
                    if (r.code === 0) {
                        alert('操作成功', function (index) {
                            layer.closeAll();
                        });
                    } else {
                        alert(r.msg);
                    }
                }
            });

        }, function () {
            var url = "bss/apbase/projectAudit";
            $.ajax({
                type: "POST",
                url: baseURL + url,
                data: {
                    "guid": guid,
                    "shyj":shyj,
                    "isPass": true
                },
                success: function (r) {
                    if (r.code === 0) {
                        alert('操作成功', function (index) {
                            layer.closeAll();
                        });
                    } else {
                        alert(r.msg);
                    }
                }
            });
        });

    }

</script>
</body>
</html>